package com.lzq.config.demo.controller;

import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/yml")
public class YmlController {
    @Value("${server.port}")
    private Integer port;

    @PostConstruct
    public void readPropertiesValue() {
        System.out.println("===================");
        System.out.println(port);
    }
}
